import java.io.*;

public class TestScanner 
{

    public static void main (String[] args) throws IOException 
    {
	
    	Yylex myscanner = new Yylex(System.in);
    	Yytoken nextToken = myscanner.yylex();

    	while (nextToken != null) 
    	{
    		System.out.print(nextToken.getToken());

    		if (nextToken.getToken().equals("INTEGER"))
    		{
    			System.out.println(" : " + nextToken.getIntValue());
    		}
    		else if (nextToken.getToken().equals("DOUBLE"))
    		{
    			System.out.println(" : " + nextToken.getDblValue());
    		}
    		else if (nextToken.getToken().equals("ID") || nextToken.getToken().equals("BOOL_CONS")) 
    		{
    			System.out.println(" : " + nextToken.getName());
    		}
    		else
    		{
    			System.out.println();
    		}
        	
    		nextToken = myscanner.yylex();
	    }
	}
}